Repetier-Firmware  1.0.0
Configuration_act.h
Go to the documentation of this file.
1 /*
2  This file is part of Repetier-Firmware.
3 
4  Repetier-Firmware is free software: you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation, either version 3 of the License, or
7  (at your option) any later version.
8 
9  Repetier-Firmware is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with Repetier-Firmware. If not, see <http://www.gnu.org/licenses/>.
16 
17 */
18 
19 #ifndef CONFIGURATION_H
20 #define CONFIGURATION_H
21 
22 /* Some words on units:
23 
24 From 0.80 onwards the units used are unified for easier configuration, watch out when transferring from older configs!
25 
26 Speed is in mm/s
27 Acceleration in mm/s^2
28 Temperature is in degrees celsius
29 
30 
31 ##########################################################################################
32 ## IMPORTANT ##
33 ##########################################################################################
34 
35 For easy configuration, the default settings enable parameter storage in EEPROM.
36 This means, after the first upload many variables can only be changed using the special
37 M commands as described in the documentation. Changing these values in the configuration.h
38 file has no effect. Parameters overriden by EEPROM settings are calibration values, extruder
39 values except thermistor tables and some other parameter likely to change during usage
40 like advance steps or ops mode.
41 To override EEPROM settings with config settings, set EEPROM_MODE 0
42 
43 */
44 
45 
46 // BASIC SETTINGS: select your board type, thermistor type, axis scaling, and endstop configuration
47 
49 #define NUM_EXTRUDER 1
50 
52 #define MIXING_EXTRUDER 0
53 
55 // Gen3 PLUS for RepRap Motherboard V1.2 = 21
56 // MEGA/RAMPS up to 1.2 = 3
57 // RAMPS 1.3/RAMPS 1.4 = 33
58 // Azteeg X3 = 34
59 // Azteeg X3 Pro = 35
60 // Ultimaker Shield 1.5.7 = 37
61 // Gen6 = 5
62 // Gen6 deluxe = 51
63 // Sanguinololu up to 1.1 = 6
64 // Sanguinololu 1.2 and above = 62
65 // 3Drag/Velleman K8200 = 66 (experimental)
66 // Open Motion Controller = 91
67 // Melzi board = 63 // Define REPRAPPRO_HUXLEY if you have one for correct HEATER_1_PIN assignment!
68 // Azteeg X1 = 65
69 // 3Drag/Velleman K8200 (experimental) = 66
70 // Gen7 1.1 till 1.3.x = 7
71 // Gen7 1.4.1 and later = 71
72 // Sethi 3D_1 = 72
73 // Teensylu (at90usb) = 8 // requires Teensyduino
74 // Printrboard (at90usb) = 9 // requires Teensyduino
75 // Printrboard Ref. F or newer= 92 // requires Teensyduino
76 // Foltyn 3D Master = 12
77 // MegaTronics 1.0 = 70
78 // Megatronics 2.0 = 701
79 // Megatronics 3.0 = 703 // Thermistors predefined not thermocouples
80 // Minitronics 1.0 = 702
81 // RUMBA = 80 // Get it from reprapdiscount
82 // FELIXprinters = 101
83 // Rambo = 301
84 // PiBot for Repetier V1.0-1.3= 314
85 // PiBot for Repetier V1.4 = 315
86 // PiBot Controller V2.0 = 316
87 // Sanguish Beta = 501
88 // Unique One rev. A = 88
89 // SAV MK1 = 89
90 // MJRice Pica Rev B = 183
91 // MJRice Pica Rev C = 184
92 // User layout defined in userpins.h = 999
93 
94 #define MOTHERBOARD 33
95 
96 #include "pins.h"
97 
98 // Override pin definitions from pins.h
99 //#define FAN_PIN 4 // Extruder 2 uses the default fan output, so move to an other pin
100 #define EXTERNALSERIAL use Arduino serial library instead of build in. Requires more ram, has only 63 byte input buffer.
101 
102 /*
103 We can connect BlueTooth to serial converter module directly to boards based on AtMega2560 or AtMega1280 and some boards based on AtMega2561, AtMega1281 or AtMega1284p
104 - On Melzi boards connect BT to TX1 and RX1 pins, then set BLUETOOTH_SERIAL to 1
105 - On RUMBA boards connect BT to pin 11 and 12 of X3 connector, then set BLUETOOTH_SERIAL to 3
106 - On RAMBO boards connect BT to pins 5,6 or 7,8 or 9,10 on Serial connector, then accordingly set BLUETOOTH_SERIAL to 1,2 or 3
107 - On RAMPS we must remap Y_ENDSTOPS pins or Z_ENDSTOPZ pins or LCD_ENABLE and LCD_RS pins to another pins, and connect BT to:
108  a) signals of Y_MIN, Y_MAX, then set BLUETOOTH_SERIAL to 3 (RX from BT to Y_MIN, TX from BT to Y_MAX)
109  b) signals of Z_MIN, Z_MAX, then set BLUETOOTH_SERIAL to 1 (RX from BT to Z_MIN, TX from BT to Z_MAX)
110  c) pin 17 and 18 of AUX4 connector, then set BLUETOOTH_SERIAL to 2 (RX from BT to AUX4 p18, TX from BT to AUX4 p17)
111  Comment out or set the BLUETOOTH_SERIAL to 0 or -1 to disable this feature.
112 */
113 #define BLUETOOTH_SERIAL 1 // Port number (1..3) - For RUMBA use 3
114 #define BLUETOOTH_BAUD 115200 // communication speed
115 
116 // Uncomment the following line if you are using Arduino compatible firmware made for Arduino version earlier then 1.0
117 // If it is incompatible you will get compiler errors about write functions not being compatible!
118 //#define COMPAT_PRE1
119 
120 /* Define the type of axis movements needed for your printer. The typical case
121 is a full cartesian system where x, y and z moves are handled by separate motors.
122 
123 0 = full cartesian system, xyz have separate motors.
124 1 = z axis + xy H-gantry (x_motor = x+y, y_motor = x-y)
125 2 = z axis + xy H-gantry (x_motor = x+y, y_motor = y-x)
126 3 = Delta printers (Rostock, Kossel, RostockMax, Cerberus, etc)
127 4 = Tuga printer (Scott-Russell mechanism)
128 5 = Bipod system (not implemented)
129 8 = y axis + xz H-gantry (x_motor = x+z, z_motor = x-z)
130 9 = y axis + xz H-gantry (x_motor = x+z, z_motor = z-x)
131 Cases 1, 2, 8 and 9 cover all needed xy and xz H gantry systems. If you get results mirrored etc. you can swap motor connections for x and y.
132 If a motor turns in the wrong direction change INVERT_X_DIR or INVERT_Y_DIR.
133 */
134 #define DRIVE_SYSTEM 0
135 
136 /* You can write some GCODE to be executed on startup. Use this e.g. to set some
137 pins. Separate multiple GCODEs with \n
138 */
139 //#define STARTUP_GCODE ""
140 
141 // ##########################################################################################
142 // ## Calibration ##
143 // ##########################################################################################
144 
147 #if DRIVE_SYSTEM == DELTA
148  // ***************************************************
149  // *** These parameter are only for Delta printers ***
150  // ***************************************************
151 
153 #define DELTA_DRIVE_TYPE 0
154 
155 #if DELTA_DRIVE_TYPE == 0
156 
157 #define BELT_PITCH 2
158 
159 #define PULLEY_TEETH 20
160 #define PULLEY_CIRCUMFERENCE (BELT_PITCH * PULLEY_TEETH)
161 #elif DELTA_DRIVE_TYPE == 1
162 
163 #define PULLEY_DIAMETER 10
164 #define PULLEY_CIRCUMFERENCE (PULLEY_DIAMETER * 3.1415927)
165 #endif
166 
168 #define STEPS_PER_ROTATION 200
169 
171 #define MICRO_STEPS 16
172 
173 // Calculations
174 #define AXIS_STEPS_PER_MM ((float)(MICRO_STEPS * STEPS_PER_ROTATION) / PULLEY_CIRCUMFERENCE)
175 #define XAXIS_STEPS_PER_MM AXIS_STEPS_PER_MM
176 #define YAXIS_STEPS_PER_MM AXIS_STEPS_PER_MM
177 #define ZAXIS_STEPS_PER_MM AXIS_STEPS_PER_MM
178 #else
179 // *******************************************************
180 // *** These parameter are for all other printer types ***
181 // *******************************************************
182 
187 #define XAXIS_STEPS_PER_MM 98.425196
188 
191 #define YAXIS_STEPS_PER_MM 98.425196
192 
193 #define ZAXIS_STEPS_PER_MM 2560
194 #endif
195 
196 // ##########################################################################################
197 // ## Extruder configuration ##
198 // ##########################################################################################
199 
200 // You can use either PWM (pulse width modulation) or PDM (pulse density modulation) for
201 // extruders or coolers. PDM will give more signal changes per second, so on average it gives
202 // the cleaner signal. The only advantage of PWM is giving signals at a fixed rate and never more
203 // then PWM.
204 #define PDM_FOR_EXTRUDER 1
205 #define PDM_FOR_COOLER 1
206 
207 // The firmware checks if the heater and sensor got decoupled, which is dangerous. Since it will never reach target
208 // temperature, the heater will stay on for every which can burn your printer or house.
209 // As an additional barrier to your smoke detectors (I hope you have one above your printer) we now
210 // do some more checks to detect if something got wrong.
211 
212 // If the temp. is on hold target, it may not sway more then this degrees celsius, or we mark
213 // sensor as defect.
214 #define DECOUPLING_TEST_MAX_HOLD_VARIANCE 20
215 // Minimum temp. rise we expect after the set duration of full heating is over.
216 // Always keep a good safety margin to get no false positives. If your period is e.g. 10 seconds
217 // because at startup you already need 7 seconds until heater starts to rise temp. for sensor
218 // then you have 3 seconds of increased heating to reach 1°C.
219 #define DECOUPLING_TEST_MIN_TEMP_RISE 1
220 // Set to 1 if you want firmware to kill print on decouple
221 #define KILL_IF_SENSOR_DEFECT 0
222 // for each extruder, fan will stay on until extruder temperature is below this value
223 #define EXTRUDER_FAN_COOL_TEMP 50
224 // Retraction for sd pause over lcd
225 #define RETRACT_ON_PAUSE 2
226 // These commands get executed after storing position and going to park position.
227 #define PAUSE_START_COMMANDS ""
228 // These commands get executed before we go to stored position.
229 #define PAUSE_END_COMMANDS ""
230 /* Set to 1 if all extruders use the same heater block. Temp. control is then always
231 controlled by settings in extruder 0 definition. */
232 #define SHARED_EXTRUDER_HEATER 0
233 /* Speed in mm/s for extruder moves fom internal commands, e.g. switching extruder. */
234 #define EXTRUDER_SWITCH_XY_SPEED 100
235 
236 // Extruder offsets in steps not mm!
237 #define EXT0_X_OFFSET 0
238 #define EXT0_Y_OFFSET 0
239 #define EXT0_Z_OFFSET 0
240 // for skeinforge 40 and later, steps to pull the plastic 1 mm inside the extruder, not out. Overridden if EEPROM activated.
241 #define EXT0_STEPS_PER_MM 413 //385
242 // What type of sensor is used?
243 // 0 is no thermistor/temperature control
244 // 1 is 100k thermistor (Epcos B57560G0107F000 - RepRap-Fab.org and many other)
245 // 2 is 200k thermistor
246 // 3 is mendel-parts thermistor (EPCOS G550)
247 // 4 is 10k thermistor
248 // 8 is ATC Semitec 104GT-2
249 // 12 is 100k RS thermistor 198-961
250 // 13 is PT100 for E3D/Ultimaker
251 // 14 is 100K NTC 3950
252 // 15 DYZE DESIGN 500°C Thermistor
253 // 16 is B3 innovations 500°C sensor
254 // 5 is userdefined thermistor table 0
255 // 6 is userdefined thermistor table 1
256 // 7 is userdefined thermistor table 2
257 // 50 is userdefined thermistor table 0 for PTC thermistors
258 // 51 is userdefined thermistor table 0 for PTC thermistors
259 // 52 is userdefined thermistor table 0 for PTC thermistors
260 // 60 is AD8494, AD8495, AD8496 or AD8497 (5mV/degC and 1/4 the price of AD595 but only MSOT_08 package)
261 // 61 is AD8494, AD8495, AD8496 or AD8497 (5mV/degC and 1.25 Vref offset like adafruit breakout)
262 // 97 Generic thermistor table 1
263 // 98 Generic thermistor table 2
264 // 99 Generic thermistor table 3
265 // 100 is AD595
266 // 101 is MAX6675
267 // 102 is MAX31855
268 #define EXT0_TEMPSENSOR_TYPE 1
269 // Analog input pin for reading temperatures or pin enabling SS for MAX6675
270 #define EXT0_TEMPSENSOR_PIN TEMP_0_PIN
271 // Which pin enables the heater
272 #define EXT0_HEATER_PIN HEATER_0_PIN
273 #define EXT0_STEP_PIN E0_STEP_PIN
274 #define EXT0_DIR_PIN E0_DIR_PIN
275 // set to false/true for normal / inverse direction
276 #define EXT0_INVERSE true
277 #define EXT0_ENABLE_PIN E0_ENABLE_PIN
278 // For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
279 #define EXT0_ENABLE_ON 0
280 /* Set to 1 to mirror motor. Pins for mirrored motor are below */
281 #define EXT0_MIRROR_STEPPER 0
282 #define EXT0_STEP2_PIN E0_STEP_PIN
283 #define EXT0_DIR2_PIN E0_DIR_PIN
284 #define EXT0_INVERSE2 false
285 #define EXT0_ENABLE2_PIN E0_ENABLE_PIN
286 // The following speed settings are for skeinforge 40+ where e is the
287 // length of filament pulled inside the heater. For repsnap or older
288 // skeinforge use higher values.
289 // Overridden if EEPROM activated.
290 #define EXT0_MAX_FEEDRATE 30
291 // Feedrate from halted extruder in mm/s
292 // Overridden if EEPROM activated.
293 #define EXT0_MAX_START_FEEDRATE 10
294 // Acceleration in mm/s^2
295 // Overridden if EEPROM activated.
296 #define EXT0_MAX_ACCELERATION 4000
297 
303 #define EXT0_HEAT_MANAGER 1
304 
305 #define EXT0_WATCHPERIOD 1
306 
317 #define EXT0_PID_INTEGRAL_DRIVE_MAX 140
318 
325 #define EXT0_PID_INTEGRAL_DRIVE_MIN 60
326 
327 #define EXT0_PID_PGAIN_OR_DEAD_TIME 24
328 
330 #define EXT0_PID_I 0.88
331 
332 #define EXT0_PID_D 80
333 // maximum time the heater is can be switched on. Max = 255. Overridden if EEPROM activated.
334 #define EXT0_PID_MAX 255
335 
340 #define EXT0_ADVANCE_K 0.0f
341 #define EXT0_ADVANCE_L 0.0f
342 /* Motor steps to remove backlash for advance algorithm. These are the steps
343 needed to move the motor cog in reverse direction until it hits the driving
344 cog. Direct drive extruder need 0. */
345 #define EXT0_ADVANCE_BACKLASH_STEPS 0
346 
348 #define EXT0_WAIT_RETRACT_TEMP 150
349 
352 #define EXT0_WAIT_RETRACT_UNITS 0
353 
357 #define EXT0_SELECT_COMMANDS "M117 Extruder 1"
358 #define EXT0_DESELECT_COMMANDS ""
359 
360 #define EXT0_EXTRUDER_COOLER_PIN -1
361 
362 #define EXT0_EXTRUDER_COOLER_SPEED 255
363 
365 #define EXT0_DECOUPLE_TEST_PERIOD 18000
366 
367 #define EXT0_JAM_PIN -1
368 
369 #define EXT0_JAM_PULLUP false
370 
371 // =========================== Configuration for second extruder ========================
372 #define EXT1_X_OFFSET 0
373 #define EXT1_Y_OFFSET 0
374 #define EXT1_Z_OFFSET 0
375 // for skeinforge 40 and later, steps to pull the plastic 1 mm inside the extruder, not out. Overridden if EEPROM activated.
376 #define EXT1_STEPS_PER_MM 373
377 // What type of sensor is used?
378 // 0 is no thermistor/temperature control
379 // 1 is 100k thermistor (Epcos B57560G0107F000 - RepRap-Fab.org and many other)
380 // 2 is 200k thermistor
381 // 3 is mendel-parts thermistor (EPCOS G550)
382 // 4 is 10k thermistor
383 // 5 is userdefined thermistor table 0
384 // 6 is userdefined thermistor table 1
385 // 7 is userdefined thermistor table 2
386 // 8 is ATC Semitec 104GT-2
387 // 50 is userdefined thermistor table 0 for PTC thermistors
388 // 51 is userdefined thermistor table 0 for PTC thermistors
389 // 52 is userdefined thermistor table 0 for PTC thermistors
390 // 60 is AD8494, AD8495, AD8496 or AD8497 (5mV/degC and 1/4 the price of AD595 but only MSOT_08 package)
391 // 61 is AD8494, AD8495, AD8496 or AD8497 (5mV/degC and 1.25 Vref offset like adafruit breakout)
392 // 97 Generic thermistor table 1
393 // 98 Generic thermistor table 2
394 // 99 Generic thermistor table 3
395 // 100 is AD595
396 // 101 is MAX6675
397 #define EXT1_TEMPSENSOR_TYPE 3
398 // Analog input pin for reading temperatures or pin enabling SS for MAX6675
399 #define EXT1_TEMPSENSOR_PIN TEMP_2_PIN
400 // Which pin enables the heater
401 #define EXT1_HEATER_PIN HEATER_2_PIN
402 #define EXT1_STEP_PIN E1_STEP_PIN
403 #define EXT1_DIR_PIN E1_DIR_PIN
404 // set to 0/1 for normal / inverse direction
405 #define EXT1_INVERSE false
406 #define EXT1_ENABLE_PIN E1_ENABLE_PIN
407 // For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
408 #define EXT1_ENABLE_ON false
409 /* Set to 1 to mirror motor. Pins for mirrored motor are below */
410 #define EXT1_MIRROR_STEPPER 0
411 #define EXT1_STEP2_PIN E0_STEP_PIN
412 #define EXT1_DIR2_PIN E0_DIR_PIN
413 #define EXT1_INVERSE2 false
414 #define EXT1_ENABLE2_PIN E0_ENABLE_PIN
415 // The following speed settings are for skeinforge 40+ where e is the
416 // length of filament pulled inside the heater. For repsnap or older
417 // skeinforge use heigher values.
418 // Overridden if EEPROM activated.
419 #define EXT1_MAX_FEEDRATE 25
420 // Feedrate from halted extruder in mm/s
421 // Overridden if EEPROM activated.
422 #define EXT1_MAX_START_FEEDRATE 12
423 // Acceleration in mm/s^2
424 // Overridden if EEPROM activated.
425 #define EXT1_MAX_ACCELERATION 10000
426 
431 #define EXT1_HEAT_MANAGER 1
432 
433 #define EXT1_WATCHPERIOD 1
434 
445 #define EXT1_PID_INTEGRAL_DRIVE_MAX 130
446 
453 #define EXT1_PID_INTEGRAL_DRIVE_MIN 60
454 
455 #define EXT1_PID_PGAIN_OR_DEAD_TIME 24
456 
458 #define EXT1_PID_I 0.88
459 
460 #define EXT1_PID_D 200
461 // maximum time the heater is can be switched on. Max = 255. Overridden if EEPROM activated.
462 #define EXT1_PID_MAX 255
463 
468 #define EXT1_ADVANCE_K 0.0f
469 #define EXT1_ADVANCE_L 0.0f
470 /* Motor steps to remove backlash for advance algorithm. These are the steps
471 needed to move the motor cog in reverse direction until it hits the driving
472 cog. Direct drive extruder need 0. */
473 #define EXT1_ADVANCE_BACKLASH_STEPS 0
474 
475 #define EXT1_WAIT_RETRACT_TEMP 150
476 #define EXT1_WAIT_RETRACT_UNITS 0
477 #define EXT1_SELECT_COMMANDS "M117 Extruder 2"
478 #define EXT1_DESELECT_COMMANDS ""
479 
480 #define EXT1_EXTRUDER_COOLER_PIN -1
481 
482 #define EXT1_EXTRUDER_COOLER_SPEED 255
483 
485 #define EXT1_DECOUPLE_TEST_PERIOD 18000
486 
487 #define EXT1_JAM_PIN -1
488 
489 #define EXT1_JAM_PULLUP false
490 
493 #define RETRACT_DURING_HEATUP 1
494 
496 #define FEATURE_RETRACTION 1
497 
499 #define AUTORETRACT_ENABLED 0
500 #define RETRACTION_LENGTH 3
501 #define RETRACTION_LONG_LENGTH 13
502 #define RETRACTION_SPEED 40
503 #define RETRACTION_Z_LIFT 0
504 #define RETRACTION_UNDO_EXTRA_LENGTH 0
505 #define RETRACTION_UNDO_EXTRA_LONG_LENGTH 0
506 #define RETRACTION_UNDO_SPEED 20
507 
512 #define FILAMENTCHANGE_X_POS 0
513 #define FILAMENTCHANGE_Y_POS 0
514 #define FILAMENTCHANGE_Z_ADD 1
515 
519 #define FILAMENTCHANGE_REHOME 1
520 
523 #define FILAMENTCHANGE_SHORTRETRACT 30
524 #define FILAMENTCHANGE_LONGRETRACT 30
525 
526 /* Define how we detect jam/out of filament
527  1 = Distance between signal changes increase
528  2 = signal gets high
529  3 = signal gets low
530 
531  2 and 3 are not jam detections, but only out of filament detection by a switch
532  that changes the signal!
533 */
534 #define JAM_METHOD 1
535 // Steps normally needed for a full signal cycle.
536 #define JAM_STEPS 220
537 // Steps for reducing speed. Must be higher then JAM_STEPS
538 #define JAM_SLOWDOWN_STEPS 380
539 // New speed multiplier which gets set when slowdown is reached.
540 #define JAM_SLOWDOWN_TO 70
541 // Last fallback. If we slip this much, we want to pause.
542 #define JAM_ERROR_STEPS 430
543 
545 #define JAM_MIN_STEPS 10
546 /*
547 Determine what should be done if a jam is detected
548 0 : Nothing, just mark extruder as jammed.
549 1 : Jam/out of filament dialog and block communication.
550 2 : Message to host/server otherwise continue and mark extruder jammed
551 */
552 #define JAM_ACTION 1
553 
558 #define PID_CONTROL_RANGE 20
559 
562 #define EXTRUDE_MAXLENGTH 100
563 
564 #define SKIP_M109_IF_WITHIN 2
565 
573 #define SCALE_PID_TO_MAX 0
574 
575 
576 #define HEATER_PWM_SPEED 1 // How fast ist pwm signal 0 = 15.25Hz, 1 = 30.51Hz, 2 = 61.03Hz, 3 = 122.06Hz
577 
582 //#define TEMP_HYSTERESIS 5
583 
601 #define NUM_TEMPS_USERTHERMISTOR0 28
602 #define USER_THERMISTORTABLE0 {\
603  {1*4,864*8},{21*4,300*8},{25*4,290*8},{29*4,280*8},{33*4,270*8},{39*4,260*8},{46*4,250*8},{54*4,240*8},{64*4,230*8},{75*4,220*8},\
604  {90*4,210*8},{107*4,200*8},{128*4,190*8},{154*4,180*8},{184*4,170*8},{221*4,160*8},{265*4,150*8},{316*4,140*8},{375*4,130*8},\
605  {441*4,120*8},{513*4,110*8},{588*4,100*8},{734*4,80*8},{856*4,60*8},{938*4,40*8},{986*4,20*8},{1008*4,0*8},{1018*4,-20*8} }
606 
608 #define NUM_TEMPS_USERTHERMISTOR1 0
609 #define USER_THERMISTORTABLE1 {}
610 
611 #define NUM_TEMPS_USERTHERMISTOR2 0
612 #define USER_THERMISTORTABLE2 {}
613 
636 //#define USE_GENERIC_THERMISTORTABLE_1
637 
638 /* Some examples for different thermistors:
639 
640 EPCOS B57560G104+ : R0 = 100000 T0 = 25 Beta = 4036
641 EPCOS 100K Thermistor (B57560G1104F) : R0 = 100000 T0 = 25 Beta = 4092
642 ATC Semitec 104GT-2 : R0 = 100000 T0 = 25 Beta = 4267
643 Honeywell 100K Thermistor (135-104LAG-J01) : R0 = 100000 T0 = 25 Beta = 3974
644 
645 */
646 
648 #define GENERIC_THERM1_T0 25
649 
650 #define GENERIC_THERM1_R0 100000
651 
656 #define GENERIC_THERM1_BETA 4036
657 
658 #define GENERIC_THERM1_MIN_TEMP -20
659 
660 #define GENERIC_THERM1_MAX_TEMP 300
661 #define GENERIC_THERM1_R1 0
662 #define GENERIC_THERM1_R2 4700
663 
664 // The same for table 2 and 3 if needed
665 
666 //#define USE_GENERIC_THERMISTORTABLE_2
667 #define GENERIC_THERM2_T0 170
668 #define GENERIC_THERM2_R0 1042.7
669 #define GENERIC_THERM2_BETA 4036
670 #define GENERIC_THERM2_MIN_TEMP -20
671 #define GENERIC_THERM2_MAX_TEMP 300
672 #define GENERIC_THERM2_R1 0
673 #define GENERIC_THERM2_R2 4700
674 
675 //#define USE_GENERIC_THERMISTORTABLE_3
676 #define GENERIC_THERM3_T0 170
677 #define GENERIC_THERM3_R0 1042.7
678 #define GENERIC_THERM3_BETA 4036
679 #define GENERIC_THERM3_MIN_TEMP -20
680 #define GENERIC_THERM3_MAX_TEMP 300
681 #define GENERIC_THERM3_R1 0
682 #define GENERIC_THERM3_R2 4700
683 
685 #define GENERIC_THERM_VREF 5
686 
688 #define GENERIC_THERM_NUM_ENTRIES 33
689 
690 // uncomment the following line for MAX6675 support.
691 //#define SUPPORT_MAX6675
692 // uncomment the following line for MAX31855 support.
693 //#define SUPPORT_MAX31855
694 
695 // ############# Heated bed configuration ########################
696 
698 #define HAVE_HEATED_BED 1
699 
700 #define HEATED_BED_MAX_TEMP 115
701 
702 #define SKIP_M190_IF_WITHIN 3
703 
704 // Select type of your heated bed. It's the same as for EXT0_TEMPSENSOR_TYPE
705 // set to 0 if you don't have a heated bed
706 #define HEATED_BED_SENSOR_TYPE 1
707 
708 #define HEATED_BED_SENSOR_PIN TEMP_1_PIN
709 
710 #define HEATED_BED_HEATER_PIN HEATER_1_PIN
711 // How often the temperature of the heated bed is set (msec)
712 #define HEATED_BED_SET_INTERVAL 5000
713 
721 #define HEATED_BED_HEAT_MANAGER 1
722 
726 #define HEATED_BED_PID_INTEGRAL_DRIVE_MAX 255
727 
734 #define HEATED_BED_PID_INTEGRAL_DRIVE_MIN 80
735 
736 #define HEATED_BED_PID_PGAIN_OR_DEAD_TIME 196
737 
738 #define HEATED_BED_PID_IGAIN 33.02
739 
740 #define HEATED_BED_PID_DGAIN 290
741 // maximum time the heater can be switched on. Max = 255. Overridden if EEPROM activated.
742 #define HEATED_BED_PID_MAX 255
743 // Time to see a temp. change when fully heating. Consider that beds at higher temp. need longer to rise and cold
744 // beds need some time to get the temp. to the sensor. Time is in milliseconds! Set 0 to disable
745 #define HEATED_BED_DECOUPLE_TEST_PERIOD 300000
746 
747 // When temperature exceeds max temp, your heater will be switched off.
748 // This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure!
749 #define MAXTEMP 260
750 
752 #define MIN_DEFECT_TEMPERATURE -10
753 #define MAX_DEFECT_TEMPERATURE 300
754 
755 //How many milliseconds a hot end will preheat before starting to check the
756 //temperature. This value should NOT be set to the time it takes the
757 //hot end to reach the target temperature, but should be set to the time it
758 //takes to reach the minimum temperature your thermistor can read. The lower
759 //the better/safer, and shouldn't need to be more than 30 seconds (30000)
760 #define MILLISECONDS_PREHEAT_TIME 30000
761 
762 // ##########################################################################################
763 // ## Laser configuration ##
764 // ##########################################################################################
765 
766 /*
767 If the firmware is in laser mode, it can control a laser output to cut or engrave materials.
768 Please use this feature only if you know about safety and required protection. Lasers are
769 dangerous and can hurt or make you blind!!!
770 
771 The default laser driver only supports laser on and off. Here you control the intensity with
772 your feedrate. For exchangeable diode lasers this is normally enough. If you need more control
773 you can set the intensity in a range 0-255 with a custom extension to the driver. See driver.h
774 and comments on how to extend the functions non invasive with our event system.
775 
776 If you have a laser - powder system you will like your E override. If moves contain a
777 increasing extruder position it will laser that move. With this trick you can
778 use existing FDM slicers to laser the output. Laser width is extrusion width.
779 
780 Other tools may use M3 and M5 to enable/disable laser. Here G1/G2/G3 moves have laser enabled
781 and G0 moves have it disables.
782 
783 In any case, laser only enables while moving. At the end of a move it gets
784 automatically disabled.
785 */
786 
787 #define SUPPORT_LASER 0 // set 1 to enable laser support
788 #define LASER_PIN -1 // set to pin enabling laser
789 #define LASER_ON_HIGH 1 // Set 0 if low signal enables laser
790 
791 // ##########################################################################################
792 // ## CNC configuration ##
793 // ##########################################################################################
794 
795 /*
796 If the firmware is in CNC mode, it can control a mill with M3/M4/M5. It works
797 similar to laser mode, but mill keeps enabled during G0 moves and it allows
798 setting rpm (only with event extension that supports this) and milling direction.
799 It also can add a delay to wait for spindle to run on full speed.
800 */
801 
802 #define SUPPORT_CNC 0 // Set 1 for CNC support
803 #define CNC_WAIT_ON_ENABLE 300 // wait x milliseconds after enabling
804 #define CNC_WAIT_ON_DISABLE 0 // delay in milliseconds after disabling spindle. May be required for direction changes.
805 #define CNC_ENABLE_PIN -1 // Pin to enable mill
806 #define CNC_ENABLE_WITH 1 // Set 0 if low enables spindle
807 #define CNC_DIRECTION_PIN -1 // Set to pin if direction control is possible
808 #define CNC_DIRECTION_CW 1 // Set signal required for clockwise rotation
809 
810 
811 /* Select the default mode when the printer gets enables. Possible values are
812 PRINTER_MODE_FFF 0
813 PRINTER_MODE_LASER 1
814 PRINTER_MODE_CNC 2
815 */
816 #define DEFAULT_PRINTER_MODE PRINTER_MODE_FFF
817 
818 // ##########################################################################################
819 // ## Endstop configuration ##
820 // ##########################################################################################
821 
822 /* By default all endstops are pulled up to HIGH. You need a pull-up if you
823 use a mechanical endstop connected with GND. Set value to false for no pull-up
824 on this endstop.
825 */
826 #define ENDSTOP_PULLUP_X_MIN false
827 #define ENDSTOP_PULLUP_Y_MIN false
828 #define ENDSTOP_PULLUP_Z_MIN false
829 #define ENDSTOP_PULLUP_X_MAX true
830 #define ENDSTOP_PULLUP_Y_MAX true
831 #define ENDSTOP_PULLUP_Z_MAX false
832 
833 //set to true to invert the logic of the endstops
834 #define ENDSTOP_X_MIN_INVERTING true
835 #define ENDSTOP_Y_MIN_INVERTING true
836 #define ENDSTOP_Z_MIN_INVERTING true
837 #define ENDSTOP_X_MAX_INVERTING false
838 #define ENDSTOP_Y_MAX_INVERTING false
839 #define ENDSTOP_Z_MAX_INVERTING true
840 
841 // Set the values true where you have a hardware endstop. The Pin number is taken from pins.h.
842 
843 #define MIN_HARDWARE_ENDSTOP_X true
844 #define MIN_HARDWARE_ENDSTOP_Y true
845 #define MIN_HARDWARE_ENDSTOP_Z false
846 #define MAX_HARDWARE_ENDSTOP_X false
847 #define MAX_HARDWARE_ENDSTOP_Y false
848 #define MAX_HARDWARE_ENDSTOP_Z true
849 
850 //If your axes are only moving in one direction, make sure the endstops are connected properly.
851 //If your axes move in one direction ONLY when the endstops are triggered, set ENDSTOPS_INVERTING to true here
852 
853 
854 
856 
857 // For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
858 #define X_ENABLE_ON 0
859 #define Y_ENABLE_ON 0
860 #define Z_ENABLE_ON 0
861 
862 // Disables axis when it's not being used.
863 #define DISABLE_X false
864 #define DISABLE_Y false
865 #define DISABLE_Z false
866 #define DISABLE_E false
867 /* If you want to keep z motor running on stepper timeout, remove comments below.
868  This may be useful if your z bed moves when motors are disabled. Will still
869  turn z off when heaters get also disabled.
870 */
871 //#define PREVENT_Z_DISABLE_ON_STEPPER_TIMEOUT
872 
873 // Inverting motor direction. Only in case of pure cartesian printers, this
874 // is also the axis you invert!
875 #define INVERT_X_DIR true
876 #define INVERT_Y_DIR true
877 #define INVERT_Z_DIR true
878 
880 // Sets direction of endstops when homing; 1=MAX, -1=MIN
881 #define X_HOME_DIR -1
882 #define Y_HOME_DIR -1
883 #define Z_HOME_DIR 1
884 
885 // Delta robot radius endstop
886 #define max_software_endstop_r true
887 
888 //If true, axis won't move to coordinates less than zero.
889 #define min_software_endstop_x false
890 #define min_software_endstop_y false
891 #define min_software_endstop_z false
892 
893 //If true, axis won't move to coordinates greater than the defined lengths below.
894 #define max_software_endstop_x true
895 #define max_software_endstop_y true
896 #define max_software_endstop_z false
897 
898 // If during homing the endstop is reached, ho many mm should the printer move back for the second try
899 #define ENDSTOP_X_BACK_MOVE 5
900 #define ENDSTOP_Y_BACK_MOVE 5
901 #define ENDSTOP_Z_BACK_MOVE 2
902 
903 // For higher precision you can reduce the speed for the second test on the endstop
904 // during homing operation. The homing speed is divided by the value. 1 = same speed, 2 = half speed
905 #define ENDSTOP_X_RETEST_REDUCTION_FACTOR 2
906 #define ENDSTOP_Y_RETEST_REDUCTION_FACTOR 2
907 #define ENDSTOP_Z_RETEST_REDUCTION_FACTOR 2
908 
909 // When you have several endstops in one circuit you need to disable it after homing by moving a
910 // small amount back. This is also the case with H-belt systems.
911 #define ENDSTOP_X_BACK_ON_HOME 1
912 #define ENDSTOP_Y_BACK_ON_HOME 1
913 #define ENDSTOP_Z_BACK_ON_HOME 0
914 
915 // You can disable endstop checking for print moves. This is needed, if you get sometimes
916 // false signals from your endstops. If your endstops don't give false signals, you
917 // can set it on for safety.
918 #define ALWAYS_CHECK_ENDSTOPS 1
919 
920 // maximum positions in mm - only fixed numbers!
921 // For delta robot Z_MAX_LENGTH is the maximum travel of the towers and should be set to the distance between the hotend
922 // and the platform when the printer is at its home position.
923 // If EEPROM is enabled these values will be overridden with the values in the EEPROM
924 #define X_MAX_LENGTH 165
925 #define Y_MAX_LENGTH 175
926 #define Z_MAX_LENGTH 116.820
927 // Coordinates for the minimum axis. Can also be negative if you want to have the bed start at 0 and the printer can go to the left side
928 // of the bed. Maximum coordinate is given by adding the above X_MAX_LENGTH values.
929 #define X_MIN_POS 0
930 #define Y_MIN_POS 0
931 #define Z_MIN_POS 0
932 
933 // ##########################################################################################
934 // ## Movement settings ##
935 // ##########################################################################################
936 
937 // Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. Currently only works for RAMBO boards
938 #define MICROSTEP_MODES {8,8,8,8,8} // [1,2,4,8,16]
939 
940 // Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards)
941 // Motor Current setting (Only functional when motor driver current ref pins are connected to a digital trimpot on supported boards)
942 #if MOTHERBOARD==301
943 //#define MOTOR_CURRENT {135,135,135,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
944 #define MOTOR_CURRENT_PERCENT {53,53,53,53,53}
945 #elif MOTHERBOARD==12
946 //#define MOTOR_CURRENT {35713,35713,35713,35713,35713} // Values 0-65535 (3D Master 35713 = ~1A)
947 #define MOTOR_CURRENT_PERCENT {55,55,55,55,55}
948 #endif
949 
952 #define DELTA_SEGMENTS_PER_SECOND_PRINT 180 // Move accurate setting for print moves
953 #define DELTA_SEGMENTS_PER_SECOND_MOVE 70 // Less accurate setting for other moves
954 
955 // Delta settings
956 #if DRIVE_SYSTEM==DELTA
957 
959 #define DELTA_DIAGONAL_ROD 345 // mm
960 
961 
962 /* =========== Parameter essential for delta calibration ===================
963 
964  C, Y-Axis
965  | |___| CARRIAGE_HORIZONTAL_OFFSET (recommend set it to 0)
966  | | \------------------------------------------
967  |_________ X-axis | \ |
968  / \ | \ DELTA_DIAGONAL_ROD (length) Each move this Rod Height
969  / \ \ is calculated
970  / \ \ Carriage is at printer center! |
971  A B \_____/--------------------------------
972  |--| END_EFFECTOR_HORIZONTAL_OFFSET (recommend set it to 0)
973  |----| ROD_RADIUS (Horizontal rod pivot to pivot measure)
974  |-----------| PRINTER_RADIUS (recommend set it to ROD_RADIUS)
975 
976  Column angles are measured from X-axis counterclockwise
977  "Standard" positions: alpha_A = 210, alpha_B = 330, alpha_C = 90
978 */
979 
981 #define DELTA_ALPHA_A 210
982 #define DELTA_ALPHA_B 330
983 #define DELTA_ALPHA_C 90
984 
986 #define DELTA_RADIUS_CORRECTION_A 0
987 #define DELTA_RADIUS_CORRECTION_B 0
988 #define DELTA_RADIUS_CORRECTION_C 0
989 
991 #define DELTA_DIAGONAL_CORRECTION_A 0
992 #define DELTA_DIAGONAL_CORRECTION_B 0
993 #define DELTA_DIAGONAL_CORRECTION_C 0
994 
996 #define DELTA_MAX_RADIUS 200
997 
998 // Margin (mm) to avoid above tower minimum (xMin xMinsteps)
999 // If your printer can put its carriage low enough the rod is horizontal without hitting the floor
1000 // set this to zero. Otherwise, measure how high the carriage is from horizontal rod
1001 // Also, movement speeds are 10x to 20x cartesian speeds at tower bottom.
1002 // You may need to leave a few mm for safety.
1003 // Hitting floor at high speed can damage your printer (motors, drives, etc)
1004 // THIS MAY NEED UPDATING IF THE HOT END HEIGHT CHANGES!
1005 #define DELTA_FLOOR_SAFETY_MARGIN_MM 15
1006 
1009 #define END_EFFECTOR_HORIZONTAL_OFFSET 0
1010 
1013 #define CARRIAGE_HORIZONTAL_OFFSET 0
1014 
1019 #define PRINTER_RADIUS 124
1020 
1023 #define EXACT_DELTA_MOVES 1
1024 
1025 /* ========== END Delta calibration data ==============*/
1026 
1030 #define DELTA_HOME_ON_POWER 0
1031 
1034 #define DELTA_X_ENDSTOP_OFFSET_STEPS 0
1035 #define DELTA_Y_ENDSTOP_OFFSET_STEPS 0
1036 #define DELTA_Z_ENDSTOP_OFFSET_STEPS 0
1037 
1038 #endif
1039 #if DRIVE_SYSTEM==TUGA
1040 // ========== Tuga special settings =============
1041 /* Radius of the long arm in mm. */
1042 #define DELTA_DIAGONAL_ROD 240
1043 #endif
1044 
1054 #define DELTASEGMENTS_PER_PRINTLINE 22
1055 
1061 #define STEPPER_INACTIVE_TIME 360
1062 
1068 #define MAX_INACTIVE_TIME 0L
1069 
1073 #define MAX_FEEDRATE_X 200
1074 #define MAX_FEEDRATE_Y 200
1075 #define MAX_FEEDRATE_Z 5
1076 
1078 #define HOMING_FEEDRATE_X 80
1079 #define HOMING_FEEDRATE_Y 80
1080 #define HOMING_FEEDRATE_Z 3
1081 
1088 #define HOMING_ORDER HOME_ORDER_ZXY
1089 // Used for homing order HOME_ORDER_ZXYTZ
1090 #define ZHOME_MIN_TEMPERATURE 0
1091 // needs to heat all extruders (1) or only current extruder (0)
1092 #define ZHOME_HEAT_ALL 1
1093 // Z-height for heating extruder during homing
1094 #define ZHOME_HEAT_HEIGHT 20
1095 // If your bed might bend while probing, because your sensor is the extruder tip
1096 // you can define a predefined x,y position so beding is always the same and
1097 // can be compensated. Set coordinate to 999999 to ignore positions and just
1098 // use the position you are at.
1099 #define ZHOME_X_POS IGNORE_COORDINATE
1100 #define ZHOME_Y_POS IGNORE_COORDINATE
1101 
1102 /* If you have a backlash in both z-directions, you can use this. For most printer, the bed will be pushed down by it's
1103 own weight, so this is nearly never needed. */
1104 #define ENABLE_BACKLASH_COMPENSATION 0
1105 #define Z_BACKLASH 0
1106 #define X_BACKLASH 0
1107 #define Y_BACKLASH 0
1108 
1110 #define RAMP_ACCELERATION 1
1111 
1117 #define STEPPER_HIGH_DELAY 0
1118 
1124 #define DIRECTION_DELAY 0
1125 
1131 #define STEP_DOUBLER_FREQUENCY 12000
1132 
1135 #define ALLOW_QUADSTEPPING 1
1136 
1140 #define DOUBLE_STEP_DELAY 0 // time in microseconds
1141 
1146 #define KEEP_ALIVE_INTERVAL 2000
1147 
1152 #define MAX_ACCELERATION_UNITS_PER_SQ_SECOND_X 1000
1153 #define MAX_ACCELERATION_UNITS_PER_SQ_SECOND_Y 1000
1154 #define MAX_ACCELERATION_UNITS_PER_SQ_SECOND_Z 100
1155 
1157 #define MAX_TRAVEL_ACCELERATION_UNITS_PER_SQ_SECOND_X 2000
1158 #define MAX_TRAVEL_ACCELERATION_UNITS_PER_SQ_SECOND_Y 2000
1159 #define MAX_TRAVEL_ACCELERATION_UNITS_PER_SQ_SECOND_Z 100
1160 
1171 #define INTERPOLATE_ACCELERATION_WITH_Z 0
1172 #define ACCELERATION_FACTOR_TOP 100
1173 
1197 #define MAX_JERK 20.0
1198 #define MAX_ZJERK 0.3
1199 
1205 #define PRINTLINE_CACHE_SIZE 16
1206 
1213 #define MOVE_CACHE_LOW 10
1214 
1219 #define LOW_TICKS_PER_MOVE 250000
1220 
1221 // ##########################################################################################
1222 // ## Extruder control ##
1223 // ##########################################################################################
1224 
1225 
1226 /* \brief Minimum temperature for extruder operation
1227 
1228 This is a safety value. If your extruder temperature is below this temperature, no
1229 extruder steps are executed. This is to prevent your extruder to move unless the filament
1230 is at least molten. After having some complains that the extruder does not work, I leave
1231 it 0 as default.
1232 */
1233 
1234 #define MIN_EXTRUDER_TEMP 160
1235 
1242 #define USE_ADVANCE 1
1243 
1248 #define ENABLE_QUADRATIC_ADVANCE 0
1249 
1250 
1251 // ##########################################################################################
1252 // ## Communication configuration ##
1253 // ##########################################################################################
1254 
1256 
1267 //#define BAUDRATE 76800
1268 #define BAUDRATE 115200
1269 //#define BAUDRATE 250000
1270 
1275 #define ENABLE_POWER_ON_STARTUP 1
1276 
1281 #define POWER_INVERTING 0
1282 
1286 #define KILL_METHOD 1
1287 
1289 #define ACK_WITH_LINENUMBER 1
1290 
1293 #define WAITING_IDENTIFIER "wait"
1294 
1304 #define ECHO_ON_EXECUTE 1
1305 
1317 #define EEPROM_MODE 2
1318 
1319 
1320 /**************** duplicate motor driver ***************
1321 
1322 If you have unused extruder steppers free, you could use it to drive the second or third z motor
1323 instead of driving them with a single stepper. The same works for the other axis if needed.
1324 */
1325 
1326 #define FEATURE_TWO_XSTEPPER 0
1327 #define X2_STEP_PIN E1_STEP_PIN
1328 #define X2_DIR_PIN E1_DIR_PIN
1329 #define X2_ENABLE_PIN E1_ENABLE_PIN
1330 
1331 #define FEATURE_TWO_YSTEPPER 0
1332 #define Y2_STEP_PIN E1_STEP_PIN
1333 #define Y2_DIR_PIN E1_DIR_PIN
1334 #define Y2_ENABLE_PIN E1_ENABLE_PIN
1335 
1336 #define FEATURE_TWO_ZSTEPPER 0
1337 #define Z2_STEP_PIN E1_STEP_PIN
1338 #define Z2_DIR_PIN E1_DIR_PIN
1339 #define Z2_ENABLE_PIN E1_ENABLE_PIN
1340 
1341 #define FEATURE_THREE_ZSTEPPER 0
1342 #define Z3_STEP_PIN E2_STEP_PIN
1343 #define Z3_DIR_PIN E2_DIR_PIN
1344 #define Z3_ENABLE_PIN E2_ENABLE_PIN
1345 
1346 #define FEATURE_FOUR_ZSTEPPER 0
1347 #define Z4_STEP_PIN E2_STEP_PIN
1348 #define Z4_DIR_PIN E2_DIR_PIN
1349 #define Z4_ENABLE_PIN E2_ENABLE_PIN
1350 
1351 /* Ditto printing allows 2 extruders to do the same action. This effectively allows
1352 to print an object two times at the speed of one. Works only with dual extruder setup.
1353 */
1354 #define FEATURE_DITTO_PRINTING 0
1355 
1356 /* Servos
1357 
1358 If you need to control servos, enable this feature. You can control up to 4 servos.
1359 Control the servos with
1360 M340 P<servoId> S<pulseInUS>
1361 servoID = 0..3
1362 Servos are controlled by a pulse width normally between 500 and 2500 with 1500ms in center position. 0 turns servo off.
1363 
1364 WARNING: Servos can draw a considerable amount of current. Make sure your system can handle this or you may risk your hardware!
1365 */
1366 
1367 #define FEATURE_SERVO 0
1368 // Servo pins on a RAMPS board are 11,6,5,4
1369 #define SERVO0_PIN 11
1370 #define SERVO1_PIN 6
1371 #define SERVO2_PIN 5
1372 #define SERVO3_PIN 4
1373 /* for set servo(s) at designed neutral position at power-up. Values < 500 mean no start position */
1374 #define SERVO0_NEUTRAL_POS -1
1375 #define SERVO1_NEUTRAL_POS -1
1376 #define SERVO2_NEUTRAL_POS -1
1377 #define SERVO3_NEUTRAL_POS -1
1378 
1379 #define UI_SERVO_CONTROL 0
1380 
1383 #define FAN_KICKSTART_TIME 200
1384 
1385 /* A watchdog resets the printer, if a signal is not send within predefined time limits. That way we can be sure that the board
1386 is always running and is not hung up for some unknown reason. */
1387 #define FEATURE_WATCHDOG 1
1388 
1389 /* Z-Probing */
1390 
1391 /* After homing the z position is corrected to compensate
1392 for a bed coating. Since you can change coatings the value is stored in
1393 EEPROM if enabled, so you can switch between different coatings without needing
1394 to recalibrate z.
1395 */
1396 #define Z_PROBE_Z_OFFSET 0 // offset to coating form real bed level
1397 /* How is z min measured
1398  0 = trigger is height of real bed neglecting coating
1399  1 = trigger is current coating
1400 
1401  For mode 1 the current coating thickness is added to measured z probe distances.
1402  That way the real bed is always the reference height. For inductive sensors
1403  or z min endstops the coating has no effect on the result, so you should use mode 0.
1404 */
1405 #define Z_PROBE_Z_OFFSET_MODE 0
1406 
1407 #define FEATURE_Z_PROBE 1
1408 // Especially if you have more then 1 extruder acting as z probe this is important!
1409 #define EXTRUDER_IS_Z_PROBE 0
1410 #define Z_PROBE_PIN 63
1411 #define Z_PROBE_PULLUP 1
1412 #define Z_PROBE_ON_HIGH 1
1413 #define Z_PROBE_X_OFFSET 0
1414 #define Z_PROBE_Y_OFFSET 0
1415 #define Z_PROBE_BED_DISTANCE 5.0 // Higher than max bed level distance error in mm
1416 
1417 // Waits for a signal to start. Valid signals are probe hit and ok button.
1418 // This is needful if you have the probe trigger by hand.
1419 #define Z_PROBE_WAIT_BEFORE_TEST 0
1420 
1421 #define Z_PROBE_SPEED 2
1422 #define Z_PROBE_XY_SPEED 150
1423 #define Z_PROBE_SWITCHING_DISTANCE 1.5 // Distance to safely switch off probe after it was activated
1424 #define Z_PROBE_REPETITIONS 5 // Repetitions for probing at one point.
1425 
1426 #define Z_PROBE_HEIGHT 39.91
1427 
1428 #define Z_PROBE_START_SCRIPT ""
1429 #define Z_PROBE_FINISHED_SCRIPT ""
1430 
1431 #define Z_PROBE_REQUIRES_HEATING 0
1432 
1433 #define Z_PROBE_MIN_TEMPERATURE 150
1434 
1435 /*
1436 Define how we measure the bed rotation.
1437 All methods need at least 3 points to define the bed rotation correctly. The quality we get comes
1438 from the selection of the right points and method.
1439 
1440 BED_LEVELING_METHOD 0
1441 This method measures at the 3 probe points and creates a plane through these points. If you have
1442 a really planar bed this gives the optimum result. The 3 points must not be in one line and have
1443 a long distance to increase numerical stability.
1444 
1445 BED_LEVELING_METHOD 1
1446 This measures a grid. Probe point 1 is the origin and points 2 and 3 span a grid. We measure
1447 BED_LEVELING_GRID_SIZE points in each direction and compute a regression plane through all
1448 points. This gives a good overall plane if you have small bumps measuring inaccuracies.
1449 
1450 BED_LEVELING_METHOD 2
1451 Bending correcting 4 point measurement. This is for cantilevered beds that have the rotation axis
1452 not at the side but inside the bed. Here we can assume no bending on the axis and a symmetric
1453 bending to both sides of the axis. So probe points 2 and 3 build the symmetric axis and
1454 point 1 is mirrored to 1m across the axis. Using the symmetry we then remove the bending
1455 from 1 and use that as plane.
1456 */
1457 #define BED_LEVELING_METHOD 0
1458 /* How to correct rotation.
1459 0 = software side
1460 1 = motorized modification of 2 from 3 fixture points.
1461 */
1462 #define BED_CORRECTION_METHOD 0
1463 // Grid size for grid based plane measurement
1464 #define BED_LEVELING_GRID_SIZE 4
1465 // Repetitions for motorized bed leveling
1466 #define BED_LEVELING_REPETITIONS 5
1467 /* These are the motor positions relative to bed origin. Only needed for
1468 motorized bed leveling */
1469 #define BED_MOTOR_1_X 0
1470 #define BED_MOTOR_1_Y 0
1471 #define BED_MOTOR_2_X 200
1472 #define BED_MOTOR_2_Y 0
1473 #define BED_MOTOR_3_X 100
1474 #define BED_MOTOR_3_Y 200
1475 
1476 /* Autoleveling allows it to z-probe 3 points to compute the inclination and compensates the error for the print.
1477  This feature requires a working z-probe and you should have z-endstop at the top not at the bottom.
1478  The same 3 points are used for the G29 command.
1479 */
1480 #define FEATURE_AUTOLEVEL 0
1481 #define Z_PROBE_X1 100
1482 #define Z_PROBE_Y1 20
1483 #define Z_PROBE_X2 160
1484 #define Z_PROBE_Y2 170
1485 #define Z_PROBE_X3 20
1486 #define Z_PROBE_Y3 170
1487 /* Bending correction adds a value to a measured z-probe value. This may be
1488  required when the z probe needs some force to trigger and this bends the
1489  bed down. Currently the correction values A/B/C correspond to z probe
1490  positions 1/2/3. In later versions a bending correction algorithm might be
1491  introduced to give it other meanings.*/
1492 #define BENDING_CORRECTION_A 0
1493 #define BENDING_CORRECTION_B 0
1494 #define BENDING_CORRECTION_C 0
1495 
1496 /* DISTORTION_CORRECTION compensates the distortion caused by mechanical imprecisions of nonlinear (i.e. DELTA) printers
1497  * assumes that the floor is plain (i.e. glass plate)
1498  * and that it is perpendicular to the towers
1499  * and that the (0,0) is in center
1500  * requires z-probe
1501  * G29 measures the Z offset in matrix NxN points (due to nature of the delta printer, the corners are extrapolated instead of measured)
1502  * and compensate the distortion
1503  * more points means better compensation, but consumes more memory and takes more time
1504  * DISTORTION_CORRECTION_R is the distance of last row or column from center
1505  */
1506 
1507 #define DISTORTION_CORRECTION 1
1508 #define DISTORTION_CORRECTION_POINTS 5
1509 /* For delta printers you simply define the measured radius around origin */
1510 #define DISTORTION_CORRECTION_R 80
1511 /* For all others you define the correction rectangle by setting the min/max coordinates. Make sure the the probe can reach all points! */
1512 #define DISTORTION_XMIN 10
1513 #define DISTORTION_YMIN 10
1514 #define DISTORTION_XMAX 190
1515 #define DISTORTION_YMAX 190
1516 
1521 #define DISTORTION_PERMANENT 1
1522 
1531 #define DISTORTION_UPDATE_FREQUENCY 15
1532 
1534 #define DISTORTION_START_DEGRADE 0.5
1535 
1536 #define DISTORTION_END_HEIGHT 1.5
1537 
1539 #define DISTORTION_EXTRAPOLATE_CORNERS 0
1540 
1541 /* If your printer is not exactly square but is more like a parallelogram, you can
1542 use this to compensate the effect of printing squares like parallelograms. Set the
1543 parameter to then tangens of the deviation from 90° when you print a square object.
1544 E.g. if you angle is 91° enter tan(1) = 0.017. If error doubles you have the wrong sign.
1545 Always hard to say since the other angle is 89° in this case!
1546 */
1547 #define FEATURE_AXISCOMP 0
1548 #define AXISCOMP_TANXY 0
1549 #define AXISCOMP_TANYZ 0
1550 #define AXISCOMP_TANXZ 0
1551 
1552 
1553 
1557 #define FEATURE_SOFTWARE_LEVELING 0
1558 
1559 /* Babystepping allows to change z height during print without changing official z height */
1560 #define FEATURE_BABYSTEPPING 0
1561 /* If you have a threaded rod, you want a higher multiplicator to see an effect. Limit value to 50 or you get easily overflows.*/
1562 #define BABYSTEP_MULTIPLICATOR 1
1563 
1564 /* Define a pin to tuen light on/off */
1565 #define CASE_LIGHTS_PIN -1
1566 #define CASE_LIGHT_DEFAULT_ON 1
1567 
1569 #ifndef SDSUPPORT // Some boards have SD support on board. These define the values already in pins.h
1570 #define SDSUPPORT false
1571 // Uncomment to enable or change card detection pin. With card detection the card is mounted on insertion.
1572 #undef SDCARDDETECT
1573 #define SDCARDDETECT -1
1574 // Change to true if you get a inserted message on removal.
1575 #define SDCARDDETECTINVERTED false
1576 #endif
1577 
1578 #define SD_EXTENDED_DIR 1
1579 
1581 #define SD_RUN_ON_STOP ""
1582 
1583 #define SD_STOP_HEATER_AND_MOTORS_ON_STOP 1
1584 
1585 // If you want support for G2/G3 arc commands set to true, otherwise false.
1586 #define ARC_SUPPORT 1
1587 
1590 #define FEATURE_MEMORY_POSITION 1
1591 
1593 #define FEATURE_CHECKSUM_FORCED 0
1594 
1598 #define FEATURE_FAN_CONTROL 1
1599 
1600 /* You can have a second fan controlled by adding P1 to M106/M107 command. */
1601 #define FEATURE_FAN2_CONTROL 0
1602 //#define FAN2_PIN ORIG_FAN2_PIN
1603 
1604 /* By setting FAN_BOARD_PIN to a pin number you get a board cooler. That fan
1605 goes on as soon as moves occur. Mainly to prevent overheating of stepper drivers. */
1606 //#undef FAN_BOARD_PIN
1607 //#define FAN_BOARD_PIN ORIG_FAN_PIN
1609 #define BOARD_FAN_SPEED 255
1610 /* Speed when no cooling is required. Normally 0 but if you need slightly cooling
1611 it can be set here */
1612 #define BOARD_FAN_MIN_SPEED 0
1613 /* You can have one additional fan controlled by a temperature. You can set
1614  set at which temperature it should turn on and at which it should reach max. speed.
1615 */
1616 #define FAN_THERMO_PIN -1
1617 #define FAN_THERMO_MIN_PWM 128
1618 #define FAN_THERMO_MAX_PWM 255
1619 #define FAN_THERMO_MIN_TEMP 45
1620 #define FAN_THERMO_MAX_TEMP 60
1621 // Analog pin number or channel for due boards
1622 #define FAN_THERMO_THERMISTOR_PIN -1
1623 #define FAN_THERMO_THERMISTOR_TYPE 1
1624 
1631 #define DOOR_PIN -1
1632 #define DOOR_PULLUP 1
1633 #define DOOR_INVERTING 1
1634 
1639 #define FEATURE_JSON 0
1640 
1671 #define FEATURE_CONTROLLER NO_CONTROLLER
1672 
1673 /* You can have one keypad connected via single analog pin as seen on
1674  some printers with Melzi V2.0 board, 20x4 LCD and 5 buttons keypad. This must be
1675  the analog pin number! */
1676 #define ADC_KEYPAD_PIN -1
1677 
1685 #define LANGUAGE_EN_ACTIVE 1 // English
1686 #define LANGUAGE_DE_ACTIVE 1 // German
1687 #define LANGUAGE_NL_ACTIVE 0 // Dutch
1688 #define LANGUAGE_PT_ACTIVE 1 // Brazilian Portuguese
1689 #define LANGUAGE_IT_ACTIVE 1 // Italian
1690 #define LANGUAGE_ES_ACTIVE 1 // Spanish
1691 #define LANGUAGE_FI_ACTIVE 0 // Finnish
1692 #define LANGUAGE_SE_ACTIVE 0 // Swedish
1693 #define LANGUAGE_FR_ACTIVE 1 // French
1694 #define LANGUAGE_CZ_ACTIVE 0 // Czech
1695 #define LANGUAGE_PL_ACTIVE 1 // Polish
1696 #define LANGUAGE_TR_ACTIVE 1 // Turkish
1697 
1698 /* Some displays loose their settings from time to time. Try uncommenting the
1699 auto-repair function if this is the case. It is not supported for all display
1700 types. It creates a minimal flicker from time to time and also slows down
1701 computations, so do not enable it if your display works stable!
1702 */
1703 //#define TRY_AUTOREPAIR_LCD_ERRORS
1704 
1705 // This is line 2 of the status display at startup. Change to your like.
1706 #define UI_PRINTER_NAME "MyPrinter"
1707 #define UI_PRINTER_COMPANY "Self Made"
1708 
1709 
1712 //#define UI_HEAD "E1:%e0/%E0 E2:%e1/%E1 B:%eb/%Eb"
1713 
1715 #define UI_PAGES_DURATION 4000
1716 
1718 #define UI_START_SCREEN_DELAY 1000
1719 
1721 #define UI_DISABLE_AUTO_PAGESWITCH 1
1722 
1724 #define UI_AUTORETURN_TO_MENU_AFTER 30000
1725 
1726 #define FEATURE_UI_KEYS 0
1727 
1728 /* Normally cou want a next/previous actions with every click of your encoder.
1729 Unfortunately, the encoder have a different count of phase changes between clicks.
1730 Select an encoder speed from 0 = fastest to 2 = slowest that results in one menu move per click.
1731 */
1732 #define UI_ENCODER_SPEED 1
1733 
1734 // Set to 1 to reverse encoder direction
1735 #define UI_REVERSE_ENCODER 0
1736 
1737 /* There are 2 ways to change positions. You can move by increments of 1/0.1 mm resulting in more menu entries
1738 and requiring many turns on your encode. The alternative is to enable speed dependent positioning. It will change
1739 the move distance depending on the speed you turn the encoder. That way you can move very fast and very slow in the
1740 same setting.
1741 
1742 */
1743 #define UI_SPEEDDEPENDENT_POSITIONING 1
1744 
1746 #define UI_DYNAMIC_ENCODER_SPEED 1 // enable dynamic rotary encoder speed
1747 
1748 
1750 #define UI_KEY_BOUNCETIME 10
1751 
1753 #define UI_KEY_FIRST_REPEAT 500
1754 
1755 #define UI_KEY_REDUCE_REPEAT 50
1756 
1757 #define UI_KEY_MIN_REPEAT 50
1758 
1759 #define FEATURE_BEEPER 1
1760 
1766 #define BEEPER_SHORT_SEQUENCE 2,2
1767 #define BEEPER_LONG_SEQUENCE 8,8
1768 
1769 // ###############################################################################
1770 // ## Values for menu settings ##
1771 // ###############################################################################
1772 
1773 /*
1774 If you have leveling with bed coating or fixed z min you can use this menu to adjust
1775 0 height with a simple bed coating menu which adds coating thickness.
1776 */
1777 #define UI_BED_COATING 0
1778 // Values used for preheat
1779 #define UI_SET_PRESET_HEATED_BED_TEMP_PLA 60
1780 #define UI_SET_PRESET_EXTRUDER_TEMP_PLA 180
1781 #define UI_SET_PRESET_HEATED_BED_TEMP_ABS 110
1782 #define UI_SET_PRESET_EXTRUDER_TEMP_ABS 240
1783 // Extreme values
1784 #define UI_SET_MIN_HEATED_BED_TEMP 55
1785 #define UI_SET_MAX_HEATED_BED_TEMP 120
1786 #define UI_SET_MIN_EXTRUDER_TEMP 160
1787 #define UI_SET_MAX_EXTRUDER_TEMP 270
1788 #define UI_SET_EXTRUDER_FEEDRATE 2 // mm/sec
1789 #define UI_SET_EXTRUDER_RETRACT_DISTANCE 3 // mm
1790 
1791 
1792 /*
1793 #define USER_KEY1_PIN UI_DISPLAY_D5_PIN // D5 to display (not used for graphics controller), change to other pin if you use character LCD !
1794 #define USER_KEY1_ACTION UI_ACTION_FAN_SUSPEND
1795 #define USER_KEY2_PIN UI_DISPLAY_D6_PIN // D6 to display (not used for graphics controller)...
1796 #define USER_KEY2_ACTION UI_ACTION_SD_PRI_PAU_CONT
1797 #define USER_KEY3_PIN UI_DISPLAY_D7_PIN // D7 to display (not used for graphics controller)...
1798 #define USER_KEY3_ACTION UI_ACTION_LIGHTS_ONOFF
1799 #define USER_KEY4_PIN -1
1800 #define USER_KEY4_ACTION UI_ACTION_DUMMY
1801 */
1802 
1803 
1804 // ####### Advanced stuff for very special function #########
1805 
1806 #define NUM_MOTOR_DRIVERS 0
1807 // #define MOTOR_DRIVER_x StepperDriver<int stepPin, int dirPin, int enablePin,bool invertDir, bool invertEnable>(float stepsPerMM,float speed)
1808 #define MOTOR_DRIVER_1(var) StepperDriver<E1_STEP_PIN, E1_DIR_PIN, E1_ENABLE_PIN, false, false> var(100.0f,5.0f)
1809 
1810 /*
1811  You can expand firmware functionality with events and you own event handler.
1812  Read Events.h for more informations. To activate, uncomment the following define.
1813 */
1814 //#define CUSTOM_EVENTS
1815 
1816 #endif
1817